﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
namespace ConsoleApp1
{
    class MyArrayList:IComparer
    {
        public int Compare(object x, object y)
        {
            String str1 = x.ToString();
            string str2 = y.ToString();
            return str1.CompareTo(str2);
        }

        //判断"abc"在集合里的位置
        public void  Estimate(int num)
        {
            if (num == -1)
            {
                Console.WriteLine("该集合不存在abc的元素");
            }
            else
            {
                Console.WriteLine("该集合存在叫abc的数组");
            }
        }
        public void PrintList(ArrayList list)
        {
            foreach (var item in list)
            {
                Console.WriteLine(item);
            }
        }

    }
}
